package com.imooc.sell.dataobject;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.stereotype.Component;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.criteria.CriteriaBuilder;
import java.util.Date;

/*
 产品类目表
 */
@Entity
@Component
@DynamicUpdate
@Data
public class ProductCategory {

    //类目id
    @Id
    @GeneratedValue
    private Integer categoryId;

    //类目名字
    private  String  categoryName;

    //类目类型
    private  Integer  categoryType;
    private Date createTime;
    private Date updateTime;


    public  ProductCategory(){

    }

    public  ProductCategory(String categoryName,Integer categoryType){
        this.setCategoryName(categoryName);
        this.setCategoryType(categoryType);
    }

}
